from bot.kernel.bot_func import *

# __plugin_name__ = '插件名'
# __plugin_usage__ = '插件说明'

def register(bot):
    # 接受 ['friend_msg', 'group_msg']
    @bot.on_command("命令名", ['别名1', '别名多用'])
    def test(info, args):
        robot_wxid = info['robot_wxid'] # info 的具体情况请查看文档
        from_wxid = info['from_wxid']
        return send_text_msg(robot_wxid, from_wxid, f'机器人回复啦on_command')

    # 接受 ['friend_msg', 'group_msg']
    @bot.on_command("命令名2", ['别名2', '别名多用']) # 两个 别名多用，那命令是别名多用的话就都能用
    def test1(info, args):
        robot_wxid = info['robot_wxid']
        from_wxid = info['from_wxid']
        return send_text_msg(robot_wxid, from_wxid, f'机器人回复啦on_command')

    # 接受 ['group_member_add', 'group_member_decrease', 'friend_verify']
    @bot.on_request("命令名2", ['别名2', '别名多用']) # 注意 command 和 request 不一样
    def test2(info, args):
        robot_wxid = info['robot_wxid']
        from_wxid = info['from_wxid']
        return send_text_msg(robot_wxid, from_wxid, f'机器人回复啦on_request')

    # 接受 ['received_transfer', 'scan_cash_money', 'contacts_change', 'sys_msg']
    @bot.on_notice("命令名2", ['别名2', '别名多用']) # 当然啦, 还有notice
    def test3(info, args):
        pass

    # 另外注意, 机器人的初始化, 开、关等事件(['init', 'enable', 'login', 'stop'])操作在 bot.plugins._on_env下